package com.hejielife.guardedsuspension2;

/**
 * 2019年8月2日 上午11:29:05
 * 
 * @author hejielife
 * @despribe
 */

public class Main {
	public static void main(String[] args) {
		RequestQueue requestQueue1 = new RequestQueue();
		RequestQueue requestQueue2 = new RequestQueue();
		// 一定要有一个消息，否则饥饿状态
		requestQueue1.putRequest(new Request("Hello"));
		new TalkThread(requestQueue1, requestQueue2, "Alice").start();
		new TalkThread(requestQueue2, requestQueue1, "Bobby").start();
	}
}
